#ifndef _MODBUSRTU_H
#define _MODBUSRTU_H

#include "../../../include/common.h"
#include "../../../include/public/public.h"

#include "../../../include/public/libmodbus/modbus.h"


typedef struct cfg_frame_s
{
    uint8_t len;
    uint8_t func;
    uint8_t start_id;
    uint8_t end_id;

    uint16_t addr;

    struct cfg_frame_s* next;
}cfg_frame_t;


typedef struct 
{
    cfg_frame_t* frames;
    // 断线次数
    int offline_cnt;

}su_param_t;


typedef struct
{
    modbus_t* ctx;
    int cnt;
} pu_param_t;

#endif